/*
 * EsferaDeformada.h
 *
 *  Created on: 21/10/2013
 *      Author: ezequiel
 */

#ifndef ESFERADEFORMADA_H_
#define ESFERADEFORMADA_H_
#include <vector>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/transform2.hpp>
#include <glm/gtx/projection.hpp>
#include <iostream>
#include <fstream>
#include "../Camara.h"
#include "../Dibujable.h"
#include <vector>
#include "../CurvaBessier.h"
#include "../CurvaSpline.h"
using namespace std;
class EsferaDeformada : public Dibujable  {
public:
	EsferaDeformada();
	~EsferaDeformada();
	void crearForma();
		void render(GLuint handle, glm::mat4* matModelo);
		void render(GLuint handle);
private:
		GLfloat* esferaF_vertex_buffer;
		GLfloat* esferaF_normal_buffer;
		GLuint* esferaF_index_buffer;
		GLfloat* esferaF_texture_buffer ;
		unsigned int esferaF_vertex_buffer_size;
		unsigned int esferaF_normal_buffer_size;
		unsigned int esferaF_index_buffer_size;
		void indexar();
		void indexarPuntos();
		void calcularNormales();
		glm::vec3 calcularNormal(glm::vec3 vec1, glm::vec3 vec2);
};

#endif /* ESFERADEFORMADA_H_ */
